/*
*    Copyright (c) 2018 Shing Liu All Rights Reserved.
*
*           File : occQt.h
*         Author : Shing Liu(eryar@163.com)
*           Date : 2018-01-08 20:00
*        Version : OpenCASCADE7.2.0 & Qt5.7.1
*
*    Description : OpenCASCADE in Qt.
*/

#ifndef OCCQT_H
#define OCCQT_H
#include "ui_occqt.h"
#include <windows.h>
#include <stdio.h>
#include <iostream>

#include <TopoDS.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>

#pragma comment(lib,"psapi.lib")

class OccView;
class SelectWidget;
class FanMaker;
class View;

//! Qt main window which include OpenCASCADE for its central widget.
class occQt : public QMainWindow
{
    Q_OBJECT

public:
    //! constructor/destructor.
    occQt(QWidget *parent = nullptr);
    ~occQt();

protected:

    //void createToolBar(void);

    virtual void keyPressEvent(QKeyEvent* event) override;

signals:
    void KeyPressed(int key);
public slots:
    void makeBox();






private slots:
    void on_actiondefinedBox_triggered();

    void on_actioneraseBox_triggered();
    void on_actionFan_triggered();

    void on_actionreset_triggered();

private:
    Ui::occQtClass ui;

    // wrapped the widget for occ.
    OccView* myOccView;
    //View* myOccView;
    SelectWidget* mySelect;

    inline float GetMemoryUsage(int pid);

    FanMaker* _fanMaker;

};

#endif // OCCQT_H
